// MSDS库
import request from '@/utils/request'

// 查询msds库分页
export function pageMsds(query) {
  return request({
    url: '/base/msds/page',
    method: 'get',
    params: query,
    factoryId:true,
  })
}

// 查询msds库列表
export function listMsds(query) {
  return request({
    url: '/base/msds/list',
    method: 'get',
    params: query,
    factoryId:true
  })
}

// 查询msds库详细
export function getMsds(id) {
  return request({
    url: '/base/msds/info/' + id,
    method: 'get'
  })
}

// 新增msds库
export function addMsds(data) {
  return request({
    url: '/base/msds',
    method: 'post',
    data: data,
    factoryId:true,
  })
}

// 修改msds库
export function updateMsds(data) {
  return request({
    url: '/base/msds',
    method: 'put',
    data: data
  })
}

// 删除msds库
export function delMsds(data) {
  return request({
    url: '/base/msds/remove/batch',
    method: 'delete',
    data
  })
}

// 导出msds库
export function exportMsds(query) {
  return request({
    url: '/base/msds/export',
    method: 'get',
    params: query
  })
}

// 下载模板msds库
export function downImportTemplate() {
  return request({
    url: '/base/msds/importTemplate',
    method: 'get'
  })
}